import request from '@/utils/request'

export function login (data) {
  return request({
    url: '/mp/v1_0/authorizations',
    method: 'POST',
    data: data
  })
}

export function getUserInfo () {
  return request({
    method: 'GET',
    url: '/mp/v1_0/user/profile'
    // 统一配置到request.js的请求拦截器中
    // headers: {
    //   Authorization: `Bearer ${localStorage.getItem('TOKEN')}`
    // }
  })
}
